/*
 * Map.h
 *
 *	Version 1.0
 *  Created on: Sep 23, 2010
 *      Author: Mark Zmek
 *
 *  Copyright 2010 Michigan Technological University. All rights reserved.
 */

#include "MapObstacle.h"
#include "renderer.h"
#include "MapTile.h"

using namespace std;

#ifndef MAP_H_
#define MAP_H_

class Map{

public:
	Map(string mapFile, Renderer* render);
	~Map();

	int getNumObstacles();
	MapObstacle** getObstacles();

	int getNumRows();
	int getNumColumns();

	int getTileWidth();
	int getTileHeight();

	//returns the width or height of the map
	int getMapWidth();
	int getMapHeight();

	void drawMap();
	void drawMap(int startX, int startY);

	MapTile* getTile(int x,int y);
	MapObstacle* getObstacle(int i);

private:

	Renderer* renderer;

	//the number of rows and columns of tiles in the map
	int rows;
	int columns;

	//width and height of each tile
	int tileWidth;
	int tileHeight;

	int numObstacles;
	int numMapImages;

	MapTile **mapImages;		//an array of MapTile pointers
	MapObstacle **obstacles;	//an array of pointers to MapObstacle
	MapTile ***mapTiles;		//a 2D array of pointers to MapTile

	SDL_Rect* currPos;//used when drawing the map
};

#endif /* MAP_H_ */
